{% load shop_currency %}

{% if order %}

<div class="order-item-products">
    <h3>Order contents</h3>
    <table>
        <thead>
            <tr>
                <th class="order-item">Item</th>
                <th class="order-quantity"><abbr title="Quantity">Qty.</abbr></th>
                <th class="order-price">Item Price</th>
                <th class="order-price">Price</th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <td class="checkout-price-title" colspan="3">Order Total Price</td>
                <td class="checkout-price">{{ order.total_price|currency }}</td>
            </tr>
        </tfoot>
        <tbody>
        {% for item in order.items %}
            <tr>
                <td class="order-item">
                    <a href="{% url shop.views.product.detail item.product.id %}">{{ item.product.name }}</a>
                </td>
                <td class="order-quantity">{{ item.quantity }}</td>
                <td class="order-price">{{ item.product.price|currency }}</td>
                <td class="order-price">{{ item.total_price|currency }}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>

{% endif %}
